package com.gy.smart.handle;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.gy.smart.R;
import com.gy.smart.base.BaseFragment;
import com.gy.smart.handle.bean.HandleDetailBean;
import com.gy.smart.handle.util.HandleDetailManager;

/**
 * Created by 高岳 on 2017/1/5.
 * Describe:详情受理条件
 */
public class HandleConditionFragment extends BaseFragment implements HandleDetailManager.IHandleDetailListener{

    private TextView tvContent;

    @Override
    protected View setView(LayoutInflater inflater) {
        View view = inflater.inflate(R.layout.fragment_handle_condition,null);
        hidenTop();
        return view;
    }

    @Override
    protected void initView() {
        tvContent = (TextView) _rootView.findViewById(R.id.fg_handle_condition_tv_content);
    }

    @Override
    protected void setListener() {
        super.setListener();
        HandleDetailManager.getInstance().addListener(this);
    }

    @Override
    protected void initData() {

    }

    @Override
    public void handleDetailChange(HandleDetailBean detailBean) {
        if(detailBean.condition != null){
            tvContent.setText(detailBean.condition.accept_condition);
        }
    }
}
